package com.example.demo.component;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author SongJun
 * @description TODO:
 * @date 2021/8/5 11:06
 */
@Component
public class TestAutowire1 {
    private String name = "I am test1";
    @Autowired
    private TestAutoWire2 test2;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("TestAutowire1{");
        sb.append("name='").append(name).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
